<template>
    <div>
        <!-- <input type="file" id="upload_file" @change="fileChange"/> -->
        <el-upload class="upload-demo" :file-list="fileList" :on-change="handleChange" action="">
            <el-button type="primary">点击上传</el-button>
        </el-upload>
    </div>
</template>

<script>
export default {
    data(){
        return{
            accesskey:'346db467b1e693d68f51',
            AccessSecretKey : 'a3f040bd9580b3beea036303a90360cde2e1faab',
            bucket : 'dchealth',
            endpoint : 'https://oos-gz.ctyunapi.cn',
            fileList: [{
                name: 'food.jpeg',
                url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
                }, {
                name: 'food2.jpeg',
                url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
            }]
        }
    },
    methods:{
        fileChange(){
            let file=document.getElementById("upload_file").files[0];
            console.log(file);
            
        },
        handleChange(file,fileList){
            console.log(file);
           fileList.push(file);
           // this.fileList=M.clone(fileList.push(file));
            //  console.log(fileList);
            //  console.log(this.fileList);
        }
    }

}
</script>

